<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <title>系统配置</title>
    <script src="../../../static/kaige/js/szload.js"></script>
    <style>
        .config-form .layui-form-item .layui-input-inline {
            width: 500px;
        }

        .hr-line-dashed {
            display: block;
            width: 100%;
            height: 0;
            border-bottom: 1px dashed #e6e6e6;
            margin: 15px auto;
            font-size: 0;
        }

        .uploadimgbtn {
            margin-top: 4px;
        }

        .layui-form .layui-form-item .labelnobb {
            border: 0;
            background-color: transparent;
        }

        .layui-form .layui-form-item .layui-form-label {
            width: 160px;
        }
    </style>
</head>

<body>
<div class="kaige-body" id="crmset_form"></div>

<script>
    load_init_js(function () {
        layui.config({
            base: szoapcpath + '/static/kaige/layuiextend/'
        }).use(['form', 'jquery', 'element', 'kaige'], function () {
            var form = layui.form, layer = layui.layer, $ = layui.jquery, element = layui.element, kaige = layui.kaige;
            kaige.form({
                url: '/crm.set/index'
                , opentype: 'dom'  // 写dom 非弹窗 必填此项
                , box: 'crmset_form'
                , id: 'kaige'
                , encode: 1
                , callbefore: function () {
                    form.render();
                }
            });
        });
    });
</script>
<script type="text/html" id="kaige_form_html">
    <div class="layui-tab layui-tab-card" style="margin-top: 0;" lay-filter="config-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">配置</li>
            <li>公海规则</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <!--平台设置-->
                <form class="layui-form layui-form-pane config-form">


                    <div class="layui-form-item">
                        <label class="layui-form-label">地图key值配置</label>
                        <div class="layui-input-inline">
                            <input name="crm_qq_map_key" required="required" placeholder="请输入地图key值配置"
                                   value="{{ d.crm_qq_map_key || '' }}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">开启邮箱stmp</label>
                        <div class="layui-input-inline">
                            <input type="checkbox" name="crm_is_stmp" lay-skin="switch" lay-text="开启|关闭"
                                   value="1" {{# if(d.crm_is_stmp=='1'){ }} checked {{# } }}/>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱smtp的host</label>
                        <div class="layui-input-inline">
                            <input name="crm_smtp_host" required="required" placeholder="请输入邮箱smtp的host"
                                   value="{{ d.crm_smtp_host || '' }}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱smtp的用户名</label>
                        <div class="layui-input-inline">
                            <input name="crm_smtp_username" required="required" placeholder="请输入邮箱smtp的用户名"
                                   value="{{ d.crm_smtp_username || '' }}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱smtp的密码</label>
                        <div class="layui-input-inline">
                            <input type="password" name="crm_smtp_password" required="required"
                                   placeholder="请输入邮箱smtp的密码"
                                   value="{{ d.crm_smtp_password || '' }}" class="layui-input">
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱smtp的端口</label>
                        <div class="layui-input-inline">
                            <input name="crm_smtp_port" required="required" placeholder="请输入邮箱smtp的端口"
                                   value="{{ d.crm_smtp_port || '' }}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">开启thinkapi短信</label>
                        <div class="layui-input-inline">
                            <input type="checkbox" name="crm_is_thinkapi_message" lay-skin="switch" lay-text="开启|关闭"
                                   value="1" {{# if(d.crm_is_thinkapi_message=='1'){ }} checked {{# } }}/>
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">thinkapi短信APP_CODE</label>
                        <div class="layui-input-inline">
                            <input name="crm_thinkapi_message_appcode" required="required"
                                   placeholder="请输入thinkapi短信APP_CODE"
                                   value="{{ d.crm_thinkapi_message_appcode || '' }}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">thinkapi短信签名</label>
                        <div class="layui-input-inline">
                            <input name="crm_thinkapi_message_sign" required="required" placeholder="请输入thinkapi短信签名"
                                   value="{{ d.crm_thinkapi_message_sign || '' }}" class="layui-input">
                        </div>
                    </div>


                    <div class="hr-line-dashed"></div>
                    <div class="layui-form-item">
                        <label class="layui-form-label labelnobb"></label>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit lay-filter="kaige_form_btn_save"><i
                                    class="fa fa-save"></i> 保存配置
                            </button>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form layui-form-pane config-form">
                    <div class="layui-form-item">

                        <div class="layui-input-block">
                            <div style="width: 30px;float: left;">
                                <input type="checkbox" name="crm_no_record" lay-skin="primary"
                                       title="" value="1" {{#if(d.crm_no_record=='1'){ }} checked {{# } }}>
                            </div>
                            <div style="width: 570px;float: left;line-height: 36px;color:#5f5f5f;">
                                超过N天“无新建跟进（跟进记录）”的客户，由系统定时退回公海客户池,选择不进入公海客户
                            </div>
                            <div style="width: 30px;float: left;">
                                <input type="checkbox" name="crm_sign_record" lay-skin="primary" title="" value="1"
                                       {{#if(d.crm_sign_record=='1'){ }} checked {{# } }}>
                            </div>
                            <div style="width: 120px;float: left;line-height: 36px;color:#5f5f5f;">
                                已成交客户,超过
                            </div>
                            <div style="width: 100px;float: left;">
                                <input type="number" name="crm_sign_record_day" class="layui-input"
                                       value="{{ d.crm_sign_record_day || '30' }}">
                            </div>
                            <div style="width: 150px;float: left;line-height: 36px;color:#5f5f5f;">
                                天未跟进，进入公海
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <div style="width:30px;float: left;">
                                <input type="checkbox" name="crm_no_deal" lay-skin="primary" value="1"
                                       title="" {{#if(d.crm_no_deal=='1'){ }} checked {{# } }}>
                            </div>
                            <div style="width: 330px;float: left;line-height: 36px;color:#5f5f5f;">
                                超过N天“未成交”的客户，由系统定时退回公海客户池
                            </div>
                            <div style="width: 100px;float: left;">
                                <input type="number" name="crm_no_deal_days" class="layui-input" value="{{ d.crm_no_deal_days
                                       || '30' }}" >
                            </div>
                            <div style="width: 170px;float: left;line-height: 36px;color:#5f5f5f;">
                                超过天未成交，进入公海
                            </div>
                        </div>
                    </div>


                    <div class="hr-line-dashed"></div>
                    <div class="layui-form-item">
                        <label class="layui-form-label labelnobb"></label>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit lay-filter="kaige_form_btn_save"><i
                                    class="fa fa-save"></i> 保存配置
                            </button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</script>
</body>

</html>